package com.qianyitian.hope2.sdk;



import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

public class BarSeries {
    private List<Bar> bars = new ArrayList<>();

    public List<Bar> getBars() {
        return bars;
    }

    public void setBars(List<Bar> bars) {
        this.bars = bars;
    }

    public void addBar(LocalDateTime time, float openPrice, float highPrice, float lowPrice,
                       float closePrice, float turnoverRate) {
        this.addBar(new Bar(time, openPrice, highPrice, lowPrice, closePrice, turnoverRate));
    }

    private void addBar(Bar bar) {
        getBars().add(bar);
    }


}
